package com.pmcc.core.repository;

import com.pmcc.core.entity.security.Dict;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * Created by chenqf on 2017/12/14.
 */
public interface DictRepository extends JpaRepository<Dict, String> {

    Page<Dict> findAll(Specification<Dict> spec, Pageable var1);

    Dict findById(String id);

    List<Dict> findByCode(String code);

    List<Dict> findByParentIdAndDelFlagOrderBySortAsc(String parentId, String delFlag);

    List<Dict> findByParentIdAndCodeAndDelFlag(String dictType, String code, String delFlag);

    void deleteByParentId(String parentId);


}
